<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*" %>
<%@ page import="common.*"%>
<%
 	String msg= (String)request.getAttribute("msg");
	List<Customer> customerlist = (List<Customer>)
		request.getAttribute("list");//後で変更
%>
<% String contextPath = request.getContextPath(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link href="<%= contextPath %>/css/order.css" rel="stylesheet" type="text/css">
	<title>顧客一覧</title>
</head>
<body>
	<%if(msg!=null){%>
	<h2><%=msg %></h2>
	<% } %>
	
	<div>
		<table id="oi">
			<tr>
				<th>顧客コード</th>
				<th>名前</th>
				<th>住所</th>
				<th>電話番号</th>
			</tr>
			<% for(int i=0;i<customerlist.size();i++){
				
					Customer customer= customerlist.get(i);//後で変更
				%>
				<tr>
					<td><a href="<%=request.getContextPath() %>/orderOpe/OrderInputServlet?code=<%=customer.getCode() %>"><%=customer.getCode()%></a></td>
					<td><%=customer.getName()%></td>
					<td><%=customer.getAddress()%></td>
					<td><%=customer.getTel()%></td>
				</tr>
				
			<% }%>
		</table>
	</div>
</body>
</html>